Optimal. Leaf size=754 \[ \frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right ) \left (48 c^2 h^2 \left (a^2 f h^2-2 a b h (2 f g-e h)+b^2 \left (d h^2-2 e g h+3 f g^2\right )\right )+8 b^2 c h^3 (-3 a f h-b e h+2 b f g)+192 c^3 h \left (a h \left (d h^2-2 e g h+3 f g^2\right )-b g \left (2 d h^2-3 e g h+4 f g^2\right )\right )+3 b^4 f h^4+128 c^4 g^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right )}{128 c^{5/2} h^6}-\frac{\sqrt{a+b x+c x^2} \left (2 c h x \left (4 c h (-3 a f h-2 b e h+4 b f g)+3 b^2 f h^2-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right )+16 c^2 h \left (4 a h (2 f g-e h)-b \left (9 d h^2-14 e g h+19 f g^2\right )\right )+4 b c h^2 (-3 a f h-2 b e h+4 b f g)+3 b^3 f h^3+64 c^3 g \left (5 f g^2-h (4 e g-3 d h)\right )\right )}{64 c^2 h^5}-\frac{\left (a+b x+c x^2\right )^{3/2} \left (6 c h^2 x \left (-a f h+b f g-4 c d h+4 c e g-\frac{5 c f g^2}{h}\right )+c h \left (8 a h (2 f g-e h)-b \left (43 f g^2-8 h (4 e g-3 d h)\right )\right )+3 b f h^2 (b g-a h)+8 c^2 g \left (5 f g^2-h (4 e g-3 d h)\right )\right )}{24 c h^3 \left (a h^2-b g h+c g^2\right )}-\frac{\left (a+b x+c x^2\right )^{5/2} \left (f g^2-h (e g-d h)\right )}{h (g+h x) \left (a h^2-b g h+c g^2\right )}-\frac{\sqrt{a h^2-b g h+c g^2} \tanh ^{-1}\left (\frac{-2 a h+x (2 c g-b h)+b g}{2 \sqrt{a+b x+c x^2} \sqrt{a h^2-b g h+c g^2}}\right ) \left (h \left (2 a h (2 f g-e h)-b \left (3 d h^2-5 e g h+7 f g^2\right )\right )+2 c g \left (5 f g^2-h (4 e g-3 d h)\right )\right )}{2 h^6} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 2.50327, antiderivative size = 750, normalized size of antiderivative = 0.99, number of steps used = 8, number of rules used = 6, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {1650, 814, 843, 621, 206, 724} \[ \frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right ) \left (48 c^2 h^2 \left (a^2 f h^2-2 a b h (2 f g-e h)+b^2 \left (d h^2-2 e g h+3 f g^2\right )\right )+8 b^2 c h^3 (-3 a f h-b e h+2 b f g)+192 c^3 h \left (a h \left (d h^2-2 e g h+3 f g^2\right )-b g \left (2 d h^2-3 e g h+4 f g^2\right )\right )+3 b^4 f h^4+128 c^4 \left (5 f g^4-g^2 h (4 e g-3 d h)\right )\right )}{128 c^{5/2} h^6}-\frac{\sqrt{a+b x+c x^2} \left (2 c h x \left (4 c h (-3 a f h-2 b e h+4 b f g)+3 b^2 f h^2-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right )-16 c^2 h \left (-4 a h (2 f g-e h)-b h (14 e g-9 d h)+19 b f g^2\right )+4 b c h^2 (-3 a f h-2 b e h+4 b f g)+3 b^3 f h^3+64 c^3 \left (5 f g^3-g h (4 e g-3 d h)\right )\right )}{64 c^2 h^5}-\frac{\left (a+b x+c x^2\right )^{3/2} \left (6 c h x \left (-a f h+b f g-4 c d h+4 c e g-\frac{5 c f g^2}{h}\right )-c \left (-8 a h (2 f g-e h)-8 b h (4 e g-3 d h)+43 b f g^2\right )+3 b f h (b g-a h)+\frac{8 c^2 \left (5 f g^3-g h (4 e g-3 d h)\right )}{h}\right )}{24 c h^2 \left (a h^2-b g h+c g^2\right )}-\frac{\left (a+b x+c x^2\right )^{5/2} \left (f g^2-h (e g-d h)\right )}{h (g+h x) \left (a h^2-b g h+c g^2\right )}-\frac{\sqrt{a h^2-b g h+c g^2} \tanh ^{-1}\left (\frac{-2 a h+x (2 c g-b h)+b g}{2 \sqrt{a+b x+c x^2} \sqrt{a h^2-b g h+c g^2}}\right ) \left (2 c \left (5 f g^3-g h (4 e g-3 d h)\right )-h \left (-2 a h (2 f g-e h)-b h (5 e g-3 d h)+7 b f g^2\right )\right )}{2 h^6} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1650
Rule 814
Rule 843
Rule 621
Rule 206
Rule 724
Rubi steps
\begin{align*} \int \frac{\left (a+b x+c x^2\right )^{3/2} \left (d+e x+f x^2\right )}{(g+h x)^2} \, dx &=-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{5/2}}{h \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\int \frac{\left (\frac{1}{2} \left (-2 c d g+5 b e g+2 a f g-\frac{5 b f g^2}{h}-3 b d h-2 a e h\right )+\left (4 c e g+b f g-\frac{5 c f g^2}{h}-4 c d h-a f h\right ) x\right ) \left (a+b x+c x^2\right )^{3/2}}{g+h x} \, dx}{c g^2-b g h+a h^2}\\ &=-\frac{\left (3 b f h (b g-a h)+\frac{8 c^2 \left (5 f g^3-g h (4 e g-3 d h)\right )}{h}-c \left (43 b f g^2-8 b h (4 e g-3 d h)-8 a h (2 f g-e h)\right )+6 c h \left (4 c e g+b f g-\frac{5 c f g^2}{h}-4 c d h-a f h\right ) x\right ) \left (a+b x+c x^2\right )^{3/2}}{24 c h^2 \left (c g^2-b g h+a h^2\right )}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{5/2}}{h \left (c g^2-b g h+a h^2\right ) (g+h x)}+\frac{\int \frac{\left (-\frac{\left (c g^2-b g h+a h^2\right ) \left (3 b^2 f g h+4 a c h (5 f g-4 e h)-8 b c \left (5 f g^2-h (4 e g-3 d h)\right )\right )}{2 h}-\frac{\left (c g^2-b g h+a h^2\right ) \left (3 b^2 f h^2+4 c h (4 b f g-2 b e h-3 a f h)-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right ) x}{2 h}\right ) \sqrt{a+b x+c x^2}}{g+h x} \, dx}{8 c h^2 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (3 b^3 f h^3+4 b c h^2 (4 b f g-2 b e h-3 a f h)+64 c^3 \left (5 f g^3-g h (4 e g-3 d h)\right )-16 c^2 h \left (19 b f g^2-b h (14 e g-9 d h)-4 a h (2 f g-e h)\right )+2 c h \left (3 b^2 f h^2+4 c h (4 b f g-2 b e h-3 a f h)-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right ) x\right ) \sqrt{a+b x+c x^2}}{64 c^2 h^5}-\frac{\left (3 b f h (b g-a h)+\frac{8 c^2 \left (5 f g^3-g h (4 e g-3 d h)\right )}{h}-c \left (43 b f g^2-8 b h (4 e g-3 d h)-8 a h (2 f g-e h)\right )+6 c h \left (4 c e g+b f g-\frac{5 c f g^2}{h}-4 c d h-a f h\right ) x\right ) \left (a+b x+c x^2\right )^{3/2}}{24 c h^2 \left (c g^2-b g h+a h^2\right )}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{5/2}}{h \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\int \frac{-\frac{1}{4} \left (c g^2-b g h+a h^2\right ) \left (4 c (b g-2 a h) \left (3 b^2 f g h+4 a c h (5 f g-4 e h)-8 b c \left (5 f g^2-h (4 e g-3 d h)\right )\right )-\frac{g \left (4 b c g-b^2 h-4 a c h\right ) \left (3 b^2 f h^2+4 c h (4 b f g-2 b e h-3 a f h)-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right )}{h}\right )-\frac{1}{4} \left (c g^2-b g h+a h^2\right ) \left (4 c (2 c g-b h) \left (3 b^2 f g h+4 a c h (5 f g-4 e h)-8 b c \left (5 f g^2-h (4 e g-3 d h)\right )\right )-\frac{\left (8 c^2 g^2-b^2 h^2-4 c h (b g-a h)\right ) \left (3 b^2 f h^2+4 c h (4 b f g-2 b e h-3 a f h)-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right )}{h}\right ) x}{(g+h x) \sqrt{a+b x+c x^2}} \, dx}{32 c^2 h^4 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (3 b^3 f h^3+4 b c h^2 (4 b f g-2 b e h-3 a f h)+64 c^3 \left (5 f g^3-g h (4 e g-3 d h)\right )-16 c^2 h \left (19 b f g^2-b h (14 e g-9 d h)-4 a h (2 f g-e h)\right )+2 c h \left (3 b^2 f h^2+4 c h (4 b f g-2 b e h-3 a f h)-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right ) x\right ) \sqrt{a+b x+c x^2}}{64 c^2 h^5}-\frac{\left (3 b f h (b g-a h)+\frac{8 c^2 \left (5 f g^3-g h (4 e g-3 d h)\right )}{h}-c \left (43 b f g^2-8 b h (4 e g-3 d h)-8 a h (2 f g-e h)\right )+6 c h \left (4 c e g+b f g-\frac{5 c f g^2}{h}-4 c d h-a f h\right ) x\right ) \left (a+b x+c x^2\right )^{3/2}}{24 c h^2 \left (c g^2-b g h+a h^2\right )}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{5/2}}{h \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\left (\left (c g^2-b g h+a h^2\right ) \left (2 c \left (5 f g^3-g h (4 e g-3 d h)\right )-h \left (7 b f g^2-b h (5 e g-3 d h)-2 a h (2 f g-e h)\right )\right )\right ) \int \frac{1}{(g+h x) \sqrt{a+b x+c x^2}} \, dx}{2 h^6}+\frac{\left (4 c (2 c g-b h) \left (3 b^2 f g h+4 a c h (5 f g-4 e h)-8 b c \left (5 f g^2-h (4 e g-3 d h)\right )\right )-\frac{\left (8 c^2 g^2-b^2 h^2-4 c h (b g-a h)\right ) \left (3 b^2 f h^2+4 c h (4 b f g-2 b e h-3 a f h)-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right )}{h}\right ) \int \frac{1}{\sqrt{a+b x+c x^2}} \, dx}{128 c^2 h^5}\\ &=-\frac{\left (3 b^3 f h^3+4 b c h^2 (4 b f g-2 b e h-3 a f h)+64 c^3 \left (5 f g^3-g h (4 e g-3 d h)\right )-16 c^2 h \left (19 b f g^2-b h (14 e g-9 d h)-4 a h (2 f g-e h)\right )+2 c h \left (3 b^2 f h^2+4 c h (4 b f g-2 b e h-3 a f h)-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right ) x\right ) \sqrt{a+b x+c x^2}}{64 c^2 h^5}-\frac{\left (3 b f h (b g-a h)+\frac{8 c^2 \left (5 f g^3-g h (4 e g-3 d h)\right )}{h}-c \left (43 b f g^2-8 b h (4 e g-3 d h)-8 a h (2 f g-e h)\right )+6 c h \left (4 c e g+b f g-\frac{5 c f g^2}{h}-4 c d h-a f h\right ) x\right ) \left (a+b x+c x^2\right )^{3/2}}{24 c h^2 \left (c g^2-b g h+a h^2\right )}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{5/2}}{h \left (c g^2-b g h+a h^2\right ) (g+h x)}+\frac{\left (\left (c g^2-b g h+a h^2\right ) \left (2 c \left (5 f g^3-g h (4 e g-3 d h)\right )-h \left (7 b f g^2-b h (5 e g-3 d h)-2 a h (2 f g-e h)\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{4 c g^2-4 b g h+4 a h^2-x^2} \, dx,x,\frac{-b g+2 a h-(2 c g-b h) x}{\sqrt{a+b x+c x^2}}\right )}{h^6}+\frac{\left (4 c (2 c g-b h) \left (3 b^2 f g h+4 a c h (5 f g-4 e h)-8 b c \left (5 f g^2-h (4 e g-3 d h)\right )\right )-\frac{\left (8 c^2 g^2-b^2 h^2-4 c h (b g-a h)\right ) \left (3 b^2 f h^2+4 c h (4 b f g-2 b e h-3 a f h)-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right )}{h}\right ) \operatorname{Subst}\left (\int \frac{1}{4 c-x^2} \, dx,x,\frac{b+2 c x}{\sqrt{a+b x+c x^2}}\right )}{64 c^2 h^5}\\ &=-\frac{\left (3 b^3 f h^3+4 b c h^2 (4 b f g-2 b e h-3 a f h)+64 c^3 \left (5 f g^3-g h (4 e g-3 d h)\right )-16 c^2 h \left (19 b f g^2-b h (14 e g-9 d h)-4 a h (2 f g-e h)\right )+2 c h \left (3 b^2 f h^2+4 c h (4 b f g-2 b e h-3 a f h)-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right ) x\right ) \sqrt{a+b x+c x^2}}{64 c^2 h^5}-\frac{\left (3 b f h (b g-a h)+\frac{8 c^2 \left (5 f g^3-g h (4 e g-3 d h)\right )}{h}-c \left (43 b f g^2-8 b h (4 e g-3 d h)-8 a h (2 f g-e h)\right )+6 c h \left (4 c e g+b f g-\frac{5 c f g^2}{h}-4 c d h-a f h\right ) x\right ) \left (a+b x+c x^2\right )^{3/2}}{24 c h^2 \left (c g^2-b g h+a h^2\right )}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{5/2}}{h \left (c g^2-b g h+a h^2\right ) (g+h x)}+\frac{\left (4 c (2 c g-b h) \left (3 b^2 f g h+4 a c h (5 f g-4 e h)-8 b c \left (5 f g^2-h (4 e g-3 d h)\right )\right )-\frac{\left (8 c^2 g^2-b^2 h^2-4 c h (b g-a h)\right ) \left (3 b^2 f h^2+4 c h (4 b f g-2 b e h-3 a f h)-16 c^2 \left (5 f g^2-h (4 e g-3 d h)\right )\right )}{h}\right ) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{128 c^{5/2} h^5}-\frac{\sqrt{c g^2-b g h+a h^2} \left (2 c \left (5 f g^3-g h (4 e g-3 d h)\right )-h \left (7 b f g^2-b h (5 e g-3 d h)-2 a h (2 f g-e h)\right )\right ) \tanh ^{-1}\left (\frac{b g-2 a h+(2 c g-b h) x}{2 \sqrt{c g^2-b g h+a h^2} \sqrt{a+b x+c x^2}}\right )}{2 h^6}\\ \end{align*}
Mathematica [A] time = 4.60272, size = 756, normalized size = 1. \[ -\frac{\frac{\frac{-2 c h \sqrt{a+x (b+c x)} \left (h (a h-b g)+c g^2\right ) \left (-4 c^2 h (a h (8 e h-16 f g+3 f h x)+2 b (h (9 d h-14 e g+e h x)+f g (19 g-2 h x)))+b c h^2 (b (-4 e h+8 f g+3 f h x)-6 a f h)+\frac{3}{2} b^3 f h^3+16 c^3 (2 g-h x) \left (h (3 d h-4 e g)+5 f g^2\right )\right )+\sqrt{c} \left (h (a h-b g)+c g^2\right ) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+x (b+c x)}}\right ) \left (\frac{1}{2} \left (4 c h (a h-b g)-b^2 h^2+8 c^2 g^2\right ) \left (4 c h (3 a f h+2 b e h-4 b f g)-3 b^2 f h^2+16 c^2 \left (h (3 d h-4 e g)+5 f g^2\right )\right )+2 c h (2 c g-b h) \left (4 a c h (5 f g-4 e h)+3 b^2 f g h-8 b c \left (h (3 d h-4 e g)+5 f g^2\right )\right )\right )+32 c^3 \left (h (a h-b g)+c g^2\right )^{3/2} \tanh ^{-1}\left (\frac{2 a h-b g+b h x-2 c g x}{2 \sqrt{a+x (b+c x)} \sqrt{h (a h-b g)+c g^2}}\right ) \left (h \left (-2 a h (e h-2 f g)+b h (5 e g-3 d h)-7 b f g^2\right )+2 c \left (g h (3 d h-4 e g)+5 f g^3\right )\right )}{16 c^2 h^5}+\frac{(a+x (b+c x))^{3/2} \left (c h (2 a h (4 e h-8 f g+3 f h x)+8 b h (3 d h-4 e g)+b f g (43 g-6 h x))+3 b f h^2 (a h-b g)+c^2 \left (8 h (3 d h (h x-g)+e g (4 g-3 h x))+10 f g^2 (3 h x-4 g)\right )\right )}{6 h^2}}{h (b g-a h)-c g^2}+\frac{(a+x (b+c x))^{5/2} \left (f h (a h-b g)+4 c h (d h-e g)+5 c f g^2\right )}{(g+h x) \left (h (a h-b g)+c g^2\right )}-\frac{f (a+x (b+c x))^{5/2}}{g+h x}}{4 c h} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.264, size = 14734, normalized size = 19.5 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]